<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>UCStockdelete</title>
</head>
<?PHP
/**
*
* This function used to delete stock data.
*/
   include ("../../Connections/SCMS.php");
   include ("../../Model/databaseOperationClass.php");
   include ("../../Model/errorReportClass.php");
   $errReport = new errorReportClass();
   $databaseOperation = new databaseOperationClass();
	$id = $_GET['id'];
	$reportTo = '../view/StockViewList.php';
	$success = $databaseOperation->deleteFromStock($id);
	if($success){
		 $errReport->errorReport(1, $reportTo);
       exit;
	}
	else{
	    $errReport->errorReport(2, $reportTo);
       exit;
	}
	
?>
<body>
</body>
</html>
